package Modules.Login
{
	public class LoginInfo
	{
		private var _response	:XML;
		private var _info		:Object;
		
		public function LoginInfo(response:XML){
			_response = response

			_info = new Object();
			_info.RESULT 	= response.RESPONSE.RESULT;
			_info.MESSAGE 	= response.RESPONSE.MESSAGE;
		}
		
		public function get LoginID():String{
			return _response.LOGINID;
		}
		
		public function get UserId():String{
			return _response.USERID;
		}
		
		public function get FirstName():String{
			return _response.FIRSTNAME;
		}

		public function get LastName():String{
			return _response.LASTNAME;
		}
		
		public function get CanCreateParentAccount():Boolean{
			return (_response.CANCREATEPARENTACCOUNT == 'X' || _response.CANCREATEPARENTACCOUNT=='1');
		}

		public function get CanEditProductMaster():Boolean{
			return (_response.CANEDITPRODUCTMASTER == 'X' || _response.CANEDITPRODUCTMASTER=='1');
		}

		public function get IsSuperUser():Boolean{
			return (_response.SUPERUSER == 'X' || _response.SUPERUSER=='1');
		}

		public function get Result():String{
			return _info.RESULT;
		}

		public function get Message():String{
			return _info.MESSAGE;
		}
		
	}
}